header {
  width: 100%;
  height: $headerHeight;
  padding: 0;
  transition: background-color $transition1;
  transition-property: background-color, border, box-shadow;

  &.layout-header {
    position: fixed;
    top: 32px;
    z-index: 3;
    @media screen and (max-width: $mobile) {
      position: fixed;
      left: 0;
      box-shadow: $shadowBottom;
    }
    border-bottom-width: 1px;
    border-bottom-style: solid;
    border-bottom-color: rgb(239, 241, 244);
    box-shadow: 0 1px 0.5px #0000001a;
  }

  &.indexHeader {
    min-height: 60px;
  }

  &.loggedInHeader {
    @media screen and (min-width: $tablet) and (max-width: $desktop) {
      .pagesContainer.linksContainer {
        grid-gap: 3px;

        .headerLink {
          padding: 10px 10px;
          font-size: $fontSizeRegular;
        }
      }
    }

    @media screen and (min-width: $mobile) and (max-width: $tablet) {
      .pagesContainer.linksContainer {
        grid-gap: 3px;

        .headerLink {
          padding: 13px 15px;
          font-size: 20px;

          span {
            display: none;
          }

          svg {
            display: block !important;
          }
        }
      }
    }
  }

  .container {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;

    .row {
      width: 100%;

      @media screen and (max-width: $mobile) {
        margin: 0 auto;
      }
    }

    a {
      text-decoration: none;
    }

    .logoLinkContainer {
      display: flex;
      align-items: center;
      height: 100%;

      svg {
        height: 100%;
      }
    }

    .headerWrapper {
      height: 30px !important;

      @media screen and (min-width: $mobile) and (max-width: $tablet) {
        height: 25px !important;

        .badge small {
          font-size: 10px !important;
        }
      }

      .zkwallet-logo {
        width: auto !important;
        height: 100% !important;
        object-fit: contain;
        @media (max-width: $mobile) {
          height: 25px !important;
        }
      }

      .badge {
        margin-top: -30px;
        padding: 0;
        color: $lightViolet !important;
        font-weight: 400;
        font-size: 12px !important;
        letter-spacing: 1px;
        text-transform: uppercase;
        background: transparent !important;
      }

      @media (max-width: $mobile) {
        padding-top: 0 !important;

        .projectLogo {
          max-width: 130px !important;
          object-fit: contain !important;
        }
      }
    }

    @media screen and (min-width: $desktop) {
      max-width: $biggestWidth;
    }
  }

  .linksContainer {
    display: grid;
    grid-auto-columns: max-content;
    grid-auto-flow: column;
    grid-gap: 10px;
    grid-template-rows: 100%;
    align-items: center;
    width: max-content;
    height: 100%;

    @media screen and (min-width: $mobile) and (max-width: $tablet) {
      grid-gap: 15px;

      .mainLink {
        font-size: 16px !important;
      }
    }

    .mainLink {
      font-size: 18px;
      text-decoration: none;
      transition: color $transition1;

      em,
      i {
        padding-left: 2px;
        color: $gray;
        font-size: 12px;
      }
    }

    .headerLink {
      padding: 10px 15px;
      color: $violet;
      border-radius: $borderRadiusMd;
      transition-property: background-color, color;
      will-change: background-color, color;

      @media screen and (min-width: $mobile) {
        transition: $transition1;
      }

      &.nuxt-link-exact-active {
        color: #27274e;
        font-weight: 600;
        background: $mediumGrey;
        //background: $light;
      }
    }
  }

  @media screen and (max-width: $mobile) {
    .pagesContainerRow {
      position: absolute;
      top: 0;
      left: 0;
    }

    .pagesContainer {
      background-color: $darkViolet;
      box-shadow: $shadowTop;
    }
    .pagesContainer {
      position: fixed;
      bottom: -1px;
      left: 0;
      z-index: 9;
      grid-gap: 2px;
      justify-content: center;
      width: 100%;
      height: 70px;
      padding: 6px 5vw;

      .headerLink {
        display: flex;
        flex-direction: column;
        justify-content: center;
        height: 100%;
        padding: 9px 10px;
        font-size: $fontSizeRegular;

        &.nuxt-link-exact-active {
          font-weight: 400;
        }

        svg {
          display: block;
          margin: 0 auto;
        }
        span {
          margin-top: 2px;
        }
      }

      .btnMore {
        position: relative;
        top: -5px;
        padding: 5px 10px;
        font-size: 20px;
        margin-left: 10px;
      }
    }
  }

  .userDropdown {
    display: grid;
    grid-template-rows: 100%;
    grid-template-columns: max-content 20px 40px;
    align-items: center;
    box-sizing: border-box;
    width: max-content;
    height: 40px;
    cursor: pointer;

    .userDropdownAddress {
      display: flex;
      flex-direction: column;
      justify-content: stretch;
      width: max-content;
      height: 100%;
      padding: 0 13px 0 5px;

      .walletLabel {
        color: darken($tempLightGray, 20);
        font-size: $fontSizeRegular;
        line-height: 20px;
        text-align: left;
      }

      .address {
        font-size: $fontSizeRegular;
        line-height: 20px;
        white-space: nowrap;
      }
    }

    .userImgContainer {
      width: 32px;
      height: 32px;

      img {
        width: 100%;
        height: 100%;
        border-radius: 40%;
      }
    }

    .dropdownArrow {
      color: $lightViolet;
      font-size: 20px;
      text-align: right;
    }

    @media screen and (max-width: $mobile) {
      grid-template-columns: 32px 30px;

      .userDropdownAddress {
        display: none;
      }
    }
  }

  .secondRow {
    display: grid;
    grid-gap: 50px;
    grid-template-rows: 100%;
    grid-template-columns: repeat(3, max-content);
    justify-content: center;
    height: auto;

    @media (max-width: $mobile) {
      grid-gap: 20px;

      a {
        font-size: $fontSizeRegular !important;
      }
    }

    a {
      position: relative;
      display: block;
      font-weight: 400;
      font-size: 18px;
      line-height: 49px;
      text-align: center;
      text-decoration: none !important;

      &.nuxt-link-exact-active,
      &:hover {
        &::after {
          background: $lightViolet;
        }
      }

      &::after {
        position: absolute;
        bottom: -2px;
        left: 0;
        width: 100%;
        height: 4px;
        background: $tempTransparent;
        content: "";
      }
    }
  }

  .addressQR {
    display: block;
    width: 210px;
    height: 210px;
    margin: 20px auto;

    @media (max-width: $mobile) {
      width: 160px;
      height: 160px;
    }
  }
}

body.inkline.-light header {
  background: $bgLight;

  .linksContainer .mainLink {
    color: $black;
  }

  .pagesContainer,
  .mobileFooter {
    @media screen and (max-width: $mobile) {
      background-color: $white;
    }
  }
}

body.inkline.-dark header.layout-header {
  background: $darkViolet;
  border-bottom-color: rgba(3, 5, 17, 0.98) !important;

  .userDropdown .userDropdownAddress .walletLabel {
    color: $gray;
  }

  .linksContainer .mainLink {
    color: $white;
  }

  .linksContainer .headerLink {
    color: $lightViolet;

    &.nuxt-link-exact-active {
      color: darken($color: $white, $amount: 15);
      background-color: darken($color: $darkViolet, $amount: 5);
    }
  }
}
